﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace lucere.entity
{
    /// <summary>Specifies whether and how a field should be indexed. </summary>
    public enum FieldIndex
    {
        /// <summary>Do not index the field value. This field can thus not be searched,
        /// but one can still access its contents provided it is
        /// {@link Field.Store stored}. 
        /// </summary>
        No,

        /// <summary>Index the tokens produced by running the field's
        /// value through an Analyzer.  This is useful for
        /// common text. 
        /// </summary>
        Analyzed,

        /// <summary>Index the field's value without using an Analyzer, so it can be searched.
        /// As no analyzer is used the value will be stored as a single term. This is
        /// useful for unique Ids like product numbers.
        /// </summary>
        NotAnalyzed,

        /// <summary>Expert: Index the field's value without an Analyzer,
        /// and also disable the storing of norms.  Note that you
        /// can also separately enable/disable norms by calling
        /// {@link Field#setOmitNorms}.  No norms means that
        /// index-time field and document boosting and field
        /// length normalization are disabled.  The benefit is
        /// less memory usage as norms take up one byte of RAM
        /// per indexed field for every document in the index,
        /// during searching.  Note that once you index a given
        /// field <i>with</i> norms enabled, disabling norms will
        /// have no effect.  In other words, for this to have the
        /// above described effect on a field, all instances of
        /// that field must be indexed with NOT_ANALYZED_NO_NORMS
        /// from the beginning. 
        /// </summary>
        NotAnalyzedNoNorms,

        /// <summary>Expert: Index the tokens produced by running the
        /// field's value through an Analyzer, and also
        /// separately disable the storing of norms.  See
        /// {@link #NOT_ANALYZED_NO_NORMS} for what norms are
        /// and why you may want to disable them. 
        /// </summary>
        AnalyzedNoNorms
    }
}
